Widen Process arguments to IEnumerable<string> - #584
Merged
Conversation
Run, RunAsync, RunAndCaptureText, RunAndCaptureTextAsync and StartAndForget declared arguments as IList<string>?, but net11 RC1 ships them as IEnumerable<string>?. Passing a sequence that is not a list, such as a LINQ result or an IReadOnlyList, compiled on net11 and failed on every polyfilled target framework. The signatures were written against an earlier preview, where the parameter was IList<string>. Widening is source compatible for existing callers.
This was referenced Sep 10, 2026
This was referenced Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run,RunAsync,RunAndCaptureText,RunAndCaptureTextAsyncandStartAndForgetdeclareargumentsasIList<string>?, but net11 RC1 ships them asIEnumerable<string>?:So passing a sequence that is not a list — a LINQ result, an
IReadOnlyList<string>, aHashSet<string>— compiles on net11 and fails to compile on every polyfilled target framework. That is the break the package exists to prevent.The signatures came from #547, written against an earlier preview where the parameter was
IList<string>. The shape changed before RC1.Widening is source compatible for existing callers.
Changes
RunSilentAsyncandBuildStartInfohelpers that carried the type through.BuildStartInfoonly enumerated the arguments, so no bodies changed.//Link:overload anchors, which encode the parameter type (system-collections-generic-ilist((system-string))to...-ienumerable((system-string))). They would otherwise point at an overload that does not exist.Consume.csnow calls all five through a variable typedIEnumerable<string>backed by aHashSet<string>, so a non-list sequence has to bind. That is a compile check across all 22 target frameworks, and on net11 it compiles against the BCL, so both sides are pinned.API count is unchanged at 1038, since this is a signature change rather than a new API.
Verification
Consumerebuilds clean in Debug across all 22 target frameworks.ApiBuilderTestsrerun to regenerate the Split files,api_list.include.mdand the readme.